<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html>
<head>
    <title>下属工作计划列表</title>
    <meta name="menu" content="subordinateWorkplan"/>
    <script type="text/javascript">
          $(document).ready(function(){
              $("#filterStatus").change(function(){
                    searchPage();
              });

              $("#excelExport").click(function(){
                  var mainForm = $("#mainForm");
                  mainForm.attr("action","workplan!subordinateExp.action");
                  mainForm.submit();
                  mainForm.attr("action","workplan!subordinate.action");
              })
          })
    </script>

</head>

<body>
<div class="content_block">
    <h2 class="jquery_tab_title">下属工作计划</h2>
    <form action="workplan!subordinate.action" method="post" id="mainForm">
        <input type="hidden" id="fileDownloadToken" name="fileDownloadToken">
        <div>
            <p>
                <label class="inline">部门:</label>
                <input name="filter.groupName" type="text" value="${filter.groupName}"
                       class="input-small" />
                <label class="inline">创建人:</label>
                <input name="filter.userName" type="text" value="${filter.userName}"
                       class="input-small" />
                <label class="inline">创建时间 从:</label>
                <input class="input-small flexy_datepicker_input" type="text" name="filter.startTimeFrom"
                       value="<s:date name='filter.startTimeFrom' format='yyyy-MM-dd'/>">
                <label class="inline">到:</label>
                <input class="input-small flexy_datepicker_input" type="text" name="filter.startTimeTo"
                       value="<s:date name='filter.startTimeTo' format='yyyy-MM-dd'/>">
                <label class="inline">当前状态:</label>
                <code:dispCodeList id="filterStatus" codeType="PLAN_STATUS" name="filter.status" codeValue="${filter.status}" displayHeader="true"/>
                <a href="#" class="button" onclick="searchPage()">查询</a>
            </p>
            <table width="100%" cellpadding="0" id="table_liquid" cellspacing="0">

                <thead>
                <tr>
                    <th><a href="javascript:sort('workplan.plan_name','asc')" scope="col">计划名</a></th>
                    <th><a href="javascript:sort('workplan.plan_target','asc')" scope="col">计划目标</a></th>
                    <th><a href="javascript:sort('workplan.plan_step','asc')" scope="col">计划步骤</a></th>
                    <th><a href="javascript:sort('workplan.plan_summary','asc')" scope="col">计划总结</a></th>
                    <th><a href="javascript:sort('user.first_','asc')" scope="col">创建人</a></th>
                    <th><a href="javascript:sort('group.name_','asc')" scope="col">所属部门</a></th>
                    <th><a href="javascript:sort('workplan.start_time','asc')" scope="col">开始时间</a></th>
                    <th><a href="javascript:sort('workplan.expect_time','asc')" scope="col">预期完成时间</a></th>
                    <th><a href="javascript:sort('workplan.end_time','asc')" scope="col">实际完成时间</a></th>
                    <th><a href="javascript:sort('workplan.status','asc')" scope="col">状态</a></th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <s:iterator value="page.result">
                    <tr <c:if test="${overDue}"> class="warn"</c:if> >
                        <td><stringDisplay:short length="5" fullText="${planName}" />&nbsp;</td>
                        <td><stringDisplay:short length="10" fullText="${planTarget}" />&nbsp;</td>
                        <td><stringDisplay:short length="10" fullText="${planStep}" />&nbsp;</td>
                        <td><stringDisplay:short length="10" fullText="${planSummary}" />&nbsp;</td>
                        <td>${userName}&nbsp;</td>
                        <td>${groupName}&nbsp;</td>
                        <td><fmt:formatDate value="${startTime}" pattern="yyyy/MM/dd"/>&nbsp;</td>
                        <td><fmt:formatDate value="${expectTime}" pattern="yyyy/MM/dd"/>&nbsp;</td>
                        <td><fmt:formatDate value="${endTime}" pattern="yyyy/MM/dd"/>&nbsp;</td>
                        <td><code:dispCodeDesc codeType="PLAN_STATUS" codeValue="${status}" />&nbsp;</td>
                        <td width="90">
                            <a href="workplan!view.action?id=${id}" title="查看">查看</a>
                        </td>
                    </tr>
                </s:iterator>
                <tr>
                    <td colspan="2" class="tdButton">
                    <c:if test="${page.totalCount>0}">
                    <a href="#"  id="excelExport" class="button">导出Excel</a>
                     </c:if>
                    </td>
                    <td colspan="9" class="pagination">
                        <%@ include file="/common/pagination.jsp" %>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
<!--end content_block-->

</body>
</html>
